import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../views/Layout/index.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "Layout",
            hidden: true,//自定义属性
            component: Layout
        },
        {
            path: '/',
            name: '牛场管理',
            component: Layout,
            iconCls:"management",
            meta: {
              type: "牛的相关信息"
            },
            children:[      
              {
                path: '/management_cattle_basic',
                name: '牛的基本信息管理',
                component: () => import('../views/management/management_cattle_basic.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/management_cattle_all',
                name: '牛的相关信息查询',
                component: () => import('../views/management/management_cattle_all.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/management_home',
                name: '牛舍住宿信息修改',
                component: () => import('../views/management/management_home.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/management_male',
                name: '公牛信息查询',
                component: () => import('../views/management/management_male.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/management_female',
                name: '母牛信息查询',
                component: () => import('../views/management/management_female.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/management_home_find',
                name: '牛舍信息查看',
                component: () => import('../views/management/management_home_find.vue'),
                meta: {
                  isLogin: true
                }
              },
            ]
          },
          {
            path: '/',
            name: '繁殖与生育信息',
            component: Layout,
            iconCls:"reproduction",
            meta: {
              type: "公牛和母牛的繁殖信息"
            },
            children:[      
              {
                path: '/reproduction_male',
                name: '公牛采精信息修改',
                component: () => import('../views/reproduction/reproduction_male.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/reproduction_female',
                name: '母牛受精信息修改',
                component: () => import('../views/reproduction/reproduction_female.vue'),
                meta: {
                  isLogin: true
                }
              }, 
                {
                path: '/reproduction_female_produce',
                name: '母牛生产信息修改',
                component: () => import('../views/reproduction/reproduction_female_produce.vue'),
                meta: {
                  isLogin: true
                }
              }, 
            ]
          },
          {
            path: '/',
            component: Layout,
            name: '药剂管理',
            iconCls: 'medication',
            meta: {
              type: "药剂"
            },
            children: [
              {
                path: '/medication_messaage',
                name: '药剂信息查询',
                component: () => import('../views/medication/medication_message.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/medication_add',
                name: '药剂信息管理',
                component: () => import('../views/medication/medication_add.vue'),
                meta: {
                  isLogin: true
                }
              },
              {
                path: '/medication_cattle',
                name: '疾病治疗',
                component: () => import('../views/medication/medication_cattle.vue'),
                meta: {
                  isLogin: true
                }
              }
            ]
          },
           {
            path: '/',
            component: Layout,
            name: '品种号对应列表',
            iconCls: 'breedList',
            meta: {
              type: "品种号以及品种名"
            },
            children: [
              {
                path: '/breed',
                name: '品种号列表',
                component: () => import('../views/breed/breed_findname.vue'),
                meta: {
                  isLogin: true
                }
              },
            ]
          },
      

    ],
  })
export default router
